import mongoose from "mongoose";
import userSchema from "./userModel.js";
const { model } = mongoose;

main()
  .then(() => {
    console.log("数据库连接成功");
  })
  .catch((err) => console.log(err));

async function main() {
  await mongoose.connect("mongodb://127.0.0.1:27017/video_manage");
}

export const User = model("User", userSchema);

